package hom.controllers;

import hom.config.AcceptableImagesFormats;
import hom.config.Const;
import hom.dao.ImgStorage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.MimeTypeUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ImageList {
    @Autowired
    ImgStorage storage;

    @RequestMapping(value = Const.URL_REST_GET_PICS_NAMES, produces = (MimeTypeUtils.APPLICATION_JSON_VALUE))
    public List<String> getAllPicsNames() {
        return storage.getAllPics();
    }



}
